<template>
  <div v-show="flag" :class="['message', className]">{{ msg }}</div>
</template>

<script>
export default {
  data() {
    return {
      flag: false,
      msg: "",
      className: "",
    };
  },
};
</script>

<style>
.message {
  width: 100%;
  position: absolute;
  text-align: center;
  top: 20px;
}
.success {
  color: green;
}
.error {
  color: red;
}
</style>
